package com.wolfeyes.common.exception;

import lombok.AllArgsConstructor;

/**
 * @title 自定义封装的异常类
 * @author yanyljava
 * @email yanyljava@qq.com
 * @create 2020-09-04 13:36
 */
@AllArgsConstructor
public class CustomException extends RuntimeException {

	private Integer code;

	private String message;

	public CustomException(String message)
	{
		this.message = message;
	}

	/*
	public CustomException(Integer code, String message) {
		this.code = code;
		this.message = message;
	}
	*/

	public CustomException(String message, Throwable e)
	{
		super(message, e);
		this.message = message;
	}

	@Override
	public String getMessage()
	{
		return message;
	}

	public Integer getCode()
	{
		return code;
	}

}